package itdfq.ydd.Behavior_Patters.observer;

import java.util.ArrayList;

/**
 * @Author GocChin
 * @Date 2021/5/23 12:57
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Descript:
 */
public abstract class Subject {
    protected ArrayList arrayList = new ArrayList();

    //注册
    public void add(Observer o){
        arrayList.add(o);
    }
    //删除
    public void shut(Observer o){
        arrayList.remove(o);
    }
    public abstract  void see();
}
